.class Lcom/example/m6wmr/ChangecityActivity$8;
.super Ljava/lang/Thread;
.source "ChangecityActivity.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/example/m6wmr/ChangecityActivity;->setbaidutosiet()Z
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lcom/example/m6wmr/ChangecityActivity;


# direct methods
.method constructor <init>(Lcom/example/m6wmr/ChangecityActivity;)V
    .locals 0

    .prologue
    .line 1
    iput-object p1, p0, Lcom/example/m6wmr/ChangecityActivity$8;->this$0:Lcom/example/m6wmr/ChangecityActivity;

    .line 338
    invoke-direct {p0}, Ljava/lang/Thread;-><init>()V

    return-void
.end method


# virtual methods
.method public run()V
    .locals 14

    .prologue
    .line 340
    invoke-super {p0}, Ljava/lang/Thread;->run()V

    .line 341
    iget-object v11, p0, Lcom/example/m6wmr/ChangecityActivity$8;->this$0:Lcom/example/m6wmr/ChangecityActivity;

    # getter for: Lcom/example/m6wmr/ChangecityActivity;->tempschls:Ljava/util/List;
    invoke-static {v11}, Lcom/example/m6wmr/ChangecityActivity;->access$2(Lcom/example/m6wmr/ChangecityActivity;)Ljava/util/List;

    move-result-object v11

    invoke-interface {v11}, Ljava/util/List;->clear()V

    .line 343
    iget-object v11, p0, Lcom/example/m6wmr/ChangecityActivity$8;->this$0:Lcom/example/m6wmr/ChangecityActivity;

    iget-object v11, v11, Lcom/example/m6wmr/ChangecityActivity;->keyWorldsView:Landroid/widget/EditText;

    invoke-virtual {v11}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v11

    invoke-interface {v11}, Landroid/text/Editable;->toString()Ljava/lang/String;

    move-result-object v11

    invoke-virtual {v11}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v11

    .line 344
    const-string v12, "%"

    const-string v13, ""

    invoke-virtual {v11, v12, v13}, Ljava/lang/String;->replaceAll(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v11

    const-string v12, " "

    const-string v13, ""

    invoke-virtual {v11, v12, v13}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;

    move-result-object v8

    .line 346
    .local v8, "tempid":Ljava/lang/String;
    new-instance v11, Ljava/lang/StringBuilder;

    iget-object v12, p0, Lcom/example/m6wmr/ChangecityActivity$8;->this$0:Lcom/example/m6wmr/ChangecityActivity;

    iget-object v12, v12, Lcom/example/m6wmr/ChangecityActivity;->m:Lmyapp/MyApp;

    invoke-virtual {v12}, Lmyapp/MyApp;->getWebConfig()Ljava/lang/String;

    move-result-object v12

    invoke-static {v12}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v12

    invoke-direct {v11, v12}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v12, "/index.php?ctrl=app&action=searchmap&searchvalue="

    invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v11

    invoke-virtual {v11, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v11

    const-string v12, "&datatype=json"

    invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v11

    invoke-virtual {v11}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v10

    .line 348
    .local v10, "url":Ljava/lang/String;
    iget-object v11, p0, Lcom/example/m6wmr/ChangecityActivity$8;->this$0:Lcom/example/m6wmr/ChangecityActivity;

    iget-object v11, v11, Lcom/example/m6wmr/ChangecityActivity;->m:Lmyapp/MyApp;

    invoke-static {v10, v11}, LPlugclass/HttpConn;->getStr(Ljava/lang/String;Lmyapp/MyApp;)Ljava/lang/String;

    move-result-object v7

    .line 349
    .local v7, "str":Ljava/lang/String;
    const-string v11, "Marinactivity"

    new-instance v12, Ljava/lang/StringBuilder;

    const-string v13, "setbaidutosiet \u8fd4\u56de\u6570\u636e\uff1a"

    invoke-direct {v12, v13}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v12, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v12

    invoke-virtual {v12}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v12

    invoke-static {v11, v12}, Lmyapp/Mylog;->d(Ljava/lang/String;Ljava/lang/String;)V

    .line 352
    :try_start_0
    new-instance v5, Lorg/json/JSONObject;

    invoke-direct {v5, v7}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V

    .line 353
    .local v5, "json":Lorg/json/JSONObject;
    const-string v11, "status"

    invoke-virtual {v5, v11}, Lorg/json/JSONObject;->isNull(Ljava/lang/String;)Z

    move-result v11

    if-eqz v11, :cond_1

    .line 355
    const-string v11, "Marinactivity"

    const-string v12, "\u6570\u636e\u5904\u7406 status\u4e3a\u7a7a"

    invoke-static {v11, v12}, Lmyapp/Mylog;->d(Ljava/lang/String;Ljava/lang/String;)V

    .line 398
    .end local v5    # "json":Lorg/json/JSONObject;
    :cond_0
    :goto_0
    return-void

    .line 358
    .restart local v5    # "json":Lorg/json/JSONObject;
    :cond_1
    const-string v11, "status"

    invoke-virtual {v5, v11}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v11

    const-string v12, "0"

    invoke-virtual {v11, v12}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v11

    if-nez v11, :cond_2

    .line 361
    const-string v11, "Marinactivity"

    const-string v12, "\u6570\u636e\u5904\u7406 status\u4e3a\u7a7a"

    invoke-static {v11, v12}, Lmyapp/Mylog;->d(Ljava/lang/String;Ljava/lang/String;)V
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 394
    .end local v5    # "json":Lorg/json/JSONObject;
    :catch_0
    move-exception v2

    .line 396
    .local v2, "e":Lorg/json/JSONException;
    invoke-virtual {v2}, Lorg/json/JSONException;->printStackTrace()V

    goto :goto_0

    .line 364
    .end local v2    # "e":Lorg/json/JSONException;
    .restart local v5    # "json":Lorg/json/JSONObject;
    :cond_2
    :try_start_1
    const-string v11, "results"

    invoke-virtual {v5, v11}, Lorg/json/JSONObject;->isNull(Ljava/lang/String;)Z

    move-result v11

    if-nez v11, :cond_0

    .line 369
    const-string v11, "results"

    invoke-virtual {v5, v11}, Lorg/json/JSONObject;->getJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;

    move-result-object v4

    .line 370
    .local v4, "jarray":Lorg/json/JSONArray;
    invoke-virtual {v4}, Lorg/json/JSONArray;->length()I

    move-result v11

    const/4 v12, 0x1

    if-le v11, v12, :cond_3

    .line 371
    const/4 v3, 0x0

    .local v3, "i":I
    :goto_1
    invoke-virtual {v4}, Lorg/json/JSONArray;->length()I

    move-result v11

    if-lt v3, v11, :cond_4

    .line 389
    .end local v3    # "i":I
    :cond_3
    new-instance v6, Landroid/os/Message;

    invoke-direct {v6}, Landroid/os/Message;-><init>()V

    .line 390
    .local v6, "msg":Landroid/os/Message;
    const/16 v11, 0x21

    iput v11, v6, Landroid/os/Message;->arg1:I

    .line 391
    iget-object v11, p0, Lcom/example/m6wmr/ChangecityActivity$8;->this$0:Lcom/example/m6wmr/ChangecityActivity;

    iget-object v11, v11, Lcom/example/m6wmr/ChangecityActivity;->h:Landroid/os/Handler;

    invoke-virtual {v11, v6}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    goto :goto_0

    .line 374
    .end local v6    # "msg":Landroid/os/Message;
    .restart local v3    # "i":I
    :cond_4
    new-instance v0, Lbean/searchBean;

    invoke-direct {v0}, Lbean/searchBean;-><init>()V

    .line 375
    .local v0, "bb":Lbean/searchBean;
    invoke-virtual {v4, v3}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;

    move-result-object v11

    const-string v12, "name"

    invoke-virtual {v11, v12}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v11

    invoke-virtual {v11}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v11

    .line 376
    const-string v12, "%"

    const-string v13, ""

    invoke-virtual {v11, v12, v13}, Ljava/lang/String;->replaceAll(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v11

    const-string v12, " "

    const-string v13, ""

    invoke-virtual {v11, v12, v13}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;

    move-result-object v9

    .line 377
    .local v9, "tempidc":Ljava/lang/String;
    invoke-virtual {v0, v9}, Lbean/searchBean;->setname(Ljava/lang/String;)V

    .line 379
    new-instance v1, Lorg/json/JSONObject;

    invoke-virtual {v4, v3}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;

    move-result-object v11

    const-string v12, "location"

    invoke-virtual {v11, v12}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v11

    invoke-direct {v1, v11}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V

    .line 381
    .local v1, "cct":Lorg/json/JSONObject;
    const-string v11, "lat"

    invoke-virtual {v1, v11}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v11

    invoke-virtual {v0, v11}, Lbean/searchBean;->setlat(Ljava/lang/String;)V

    .line 382
    const-string v11, "lng"

    invoke-virtual {v1, v11}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v11

    invoke-virtual {v0, v11}, Lbean/searchBean;->setlng(Ljava/lang/String;)V

    .line 384
    iget-object v11, p0, Lcom/example/m6wmr/ChangecityActivity$8;->this$0:Lcom/example/m6wmr/ChangecityActivity;

    # getter for: Lcom/example/m6wmr/ChangecityActivity;->tempschls:Ljava/util/List;
    invoke-static {v11}, Lcom/example/m6wmr/ChangecityActivity;->access$2(Lcom/example/m6wmr/ChangecityActivity;)Ljava/util/List;

    move-result-object v11

    invoke-interface {v11, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z
    :try_end_1
    .catch Lorg/json/JSONException; {:try_start_1 .. :try_end_1} :catch_0

    .line 371
    add-int/lit8 v3, v3, 0x1

    goto :goto_1
.end method

.method public declared-synchronized start()V
    .locals 1

    .prologue
    .line 402
    monitor-enter p0

    :try_start_0
    invoke-super {p0}, Ljava/lang/Thread;->start()V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 403
    monitor-exit p0

    return-void

    .line 402
    :catchall_0
    move-exception v0

    monitor-exit p0

    throw v0
.end method
